<template>
  <div class="user">
    <div class="header">
      <h1>邀请成员加入企业</h1>
      <div class="adduser">
        <span>创建并分享邀请链接，邀请成员加入企业</span>
        <el-button type="text" @click="dialogFormVisible = true" class="button">邀请成员</el-button>
      </div>
      <el-dialog title="分享验证码" :visible.sync="dialogFormVisible">
        <el-form :model="form">
          <div class="title">
            <h2>
              <i class="el-icon-success"></i>邀请链接和验证码已创建
            </h2>
            <h4>您可以将链接分享至QQ、微信、钉钉等工作群，同事们通过此链接即可加入企业。</h4>
          </div>
          <el-input
            v-model="form.name"
            auto-complete="off"
            class="input1"
            style="width:400px;margin:0 15px"
          ></el-input>
          <el-button
            @click="dialogFormVisible = false"
            style="margin:10px;border:1px solid #323232"
          >复制</el-button>
          <el-form-item label="注册验证码：" :label-width="formLabelWidth">
            <el-input v-model="form.name" auto-complete="off" style="width:80px"></el-input>
          </el-form-item>
        </el-form>
        <span>该链接允许所有邮箱地址注册，链接有效时长为72小时。</span>
      </el-dialog>
    </div>
    <div class="search">
      <div class="text">
        <h1>所有成员（0）</h1>
        <el-input
          placeholder="搜索成员"
          prefix-icon="el-icon-search"
          v-model="input21"
          style="width:300px; float: left;"
        ></el-input>
      </div>
      <el-table :data="tableData" border style="width: 100%; text-align: center;">
        <el-table-column prop="date" label="姓名" ></el-table-column>
        <el-table-column prop="name" label="企业角色"></el-table-column>
        <el-table-column prop="address" label="账号"></el-table-column>
        <el-table-column prop="address" label="加入企业时间"></el-table-column>
        <el-table-column fixed="right" label="操作">
          <template slot-scope="scope">
            <el-button @click="handleClick(scope.row)" type="text" size="small">禁用</el-button>
            <el-button type="text" size="small">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
        tableData: [{
          date: '2016-05-03',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1518 弄',
          zip: 200333
        }, {
          date: '2016-05-02',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1518 弄',
          zip: 200333
        }, {
          date: '2016-05-04',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1518 弄',
          zip: 200333
        }],
      dialogFormVisible: false,
      form: {
        name: "",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: ""
      },
      formLabelWidth: "120px"
    };
  }
};
</script>

<style lang="scss" scoped>
.user {
  width: 95%;
  height: 100%;
  padding:30px;
  .header {
    padding: 30px 50px;
    background-color: #fff;
    h1 {
      font-weight: 700;
      font-size: 20px;
    //   padding: 30px 50px;
    }
    .adduser {
      margin: 20px 0 0 0;
      border: 1px solid rgb(10, 10, 10);
      span {
        margin: 30px 0 0 0;
        display: block;
        text-align: center;
        font-size: 20px;
      }
      .button {
        margin: 20px 475px 80px;
        padding: 15px 30px;
        color: #fff;
        background-color: #323232;
      }
    }
    .title {
      i {
        margin: 0 5px;
        font-size: 30px;
      }
      h2 {
        margin: 10px 5px;
        font-size: 20px;
        font-weight: 600;
      }
      h4 {
        margin: 10px 44px 20px;
      }
    }
  }
  .search {
    margin: 15px 0;
    padding: 20px 30px;
    background-color: #fff;
    .text {
      h1 {
        padding: 10px;
        font-weight: 700;
        font-size: 20px;
        float: left;
      }
    }
    .el-table {
      margin: 65px 0;
      text-align: center;
    }
  }
}
</style>
